package com.ternnetwork.wechat.model.qy.txl;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.ternnetwork.wechat.enums.WechatQyUserSyncTaskStatus;
import com.ternnetwork.wechat.enums.WechatQyUserSyncTaskType;

@JsonAutoDetect
@Entity
@Table(name="VS_WECHAT_QY_USER_SYNC_TASK")
public class WechatQyUserSyncTask {

	@Id@Column(name="ID")
	@GeneratedValue(strategy = GenerationType.TABLE,generator="id_gen")
    @TableGenerator(name = "id_gen",pkColumnValue="WECHAT_QY_USER_SYNC_TASK_ID",table="VS_ID_GENERATOR", pkColumnName="GEN_NAME",valueColumnName="GEN_VALUE",allocationSize=1)
	private long id;
	
    @Temporal(TemporalType.TIMESTAMP)@Column(nullable=false,name="CREATE_TIME")
	private Date createTime=new Date();
			
	@Temporal(TemporalType.TIMESTAMP)@Column(nullable=false,name="UPDATE_TIME")
	private Date updateTime=new Date();
    
	@Column(name="USER_ID")
    private String userid;//企业号用户惟一id，需要与user表的wechatId一致
	
	@Enumerated@Column(name="STATUS")
    private WechatQyUserSyncTaskStatus status;
    
	@Enumerated@Column(name="TYPE")
    private WechatQyUserSyncTaskType  type;
	


	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public WechatQyUserSyncTaskStatus getStatus() {
		return status;
	}

	public void setStatus(WechatQyUserSyncTaskStatus status) {
		this.status = status;
	}

	public WechatQyUserSyncTaskType getType() {
		return type;
	}

	public void setType(WechatQyUserSyncTaskType type) {
		this.type = type;
	}

	
	
    
    
	
	
}
